<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>考试答题 - 英语单词测试系统</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-success">
    <div class="container-fluid">
        <a class="navbar-brand" href="/student">英语单词测试系统</a>
        <div class="d-flex">
            <a href="/logout" class="btn btn-outline-light">退出登录</a>
        </div>
    </div>
</nav>
<div class="container mt-5">
    <h4 class="mb-4">{{ exam.name }} - 答题</h4>
    <form method="post">
        {% for q in quiz %}
        <div class="card mb-3">
            <div class="card-header bg-light">
                <b>第{{ loop.index }}题：</b>
                {% if q.type == 'en2zh' %}
                    <span>【英→中】</span>
                {% else %}
                    <span>【中→英】</span>
                {% endif %}
            </div>
            <div class="card-body">
                <p class="mb-3 fs-5">{{ q.stem }}</p>
                {% for opt in q.options %}
                <div class="form-check">
                    <input class="form-check-input" type="radio" name="{{ q.id }}" id="{{ q.id }}_{{ loop.index }}" value="{{ opt }}" required>
                    <label class="form-check-label" for="{{ q.id }}_{{ loop.index }}">{{ opt }}</label>
                </div>
                {% endfor %}
            </div>
        </div>
        {% endfor %}
        <button type="submit" class="btn btn-success w-100">提交答卷</button>
    </form>
</div>
</body>
</html> 